import React, { Component } from 'react'

export default class Child extends Component {
  render() {
    return (
      <div>
        Child:
        {/* #2 子组件调用传递过来的函数并传参 */}
        <button onClick={() => this.props.changeCar('奔驰')}>奥拓变奔驰</button>
      </div>
    )
  }
}
